<%@ Page Language="C#" MasterPageFile="~/Layout.Master" AutoEventWireup="true" 
    CodeBehind="SearchWorkOrders.aspx.cs" Inherits="Headspring.Training.WebUI.SearchWorkOrders" 
    Title="Search Work Orders" %>
<%@ Import namespace="Headspring.Training.Domain.Model"%>
<asp:Content ID="Content1" ContentPlaceHolderID="Main" runat="server">
<div style="text-align:left">
	<table>
		<tr>
			<th>Creator</th>
			<th>Assignee</th>
			<th>Status</th>
			<td></td>
		</tr>
		<tr>
			<td><asp:DropDownList ID="ddlCreator" runat="server" /></td>
			<td><asp:DropDownList ID="ddlAssignee" runat="server" /></td>
			<td><asp:DropDownList ID="ddlStatus" runat="server" /></td>
			<td><asp:Button ID="btnSearch" runat="server" OnClick="RedirectToSearch" Text="Search" Width="100%"  /></td>
		</tr>
	</table>
</div>
<asp:GridView ID="grdWorkOrders" runat="server" AutoGenerateColumns="false" CellPadding="3" Width="100%" BorderWidth="0"
	 AlternatingRowStyle-BackColor="#EEEEEE">
    <Columns>
        <asp:HyperLinkField DataNavigateUrlFormatString="~/SingleWorkOrder.aspx?mode=edit&wo_number={0}"
            DataNavigateUrlFields="Number" DataTextField="Number" HeaderText="WO #" ItemStyle-VerticalAlign="Top" HeaderStyle-Wrap="false" />
        <asp:TemplateField HeaderText="Creator" ItemStyle-VerticalAlign="Top">
            <ItemTemplate>
                <%#Eval("Creator")%>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Assignee" ItemStyle-VerticalAlign="Top">
            <ItemTemplate>
                <%#Eval("Assignee")%>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Status" ItemStyle-VerticalAlign="Top" ItemStyle-Wrap="false">
            <ItemTemplate>
                <%#((WorkOrder)Container.DataItem).Status.ToString() %>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField HeaderText="Title" DataField="Title" ItemStyle-VerticalAlign="Top" />
    </Columns>
</asp:GridView>

</asp:Content>

